package com.ceba.test.modules.log.logicService;

import org.json.JSONObject;

import com.ceba.test.modules.log.service.OpLogService;

import abc.IContextDictionary;
import abc.web.HttpContext;

import java.util.Map;

public class LogLogicService {
	
	private  OpLogService opLogService;
	
	/**
	 * 
	 * @return
	 * @throws Exception
	 */
	public String getLogsListJson(JSONObject dt) throws Exception {
		return opLogService.getLogsListJson(dt);
	}
	
	public JSONObject getAllNoSignFileCount(HttpContext context, IContextDictionary dic) throws Exception {
		return opLogService.getLogsList(dic);
	}
	
	
	// 添加一条日志
     public void addLog(int logType, int opType, String message, String errorMessage,String hashMessage) {
    	  opLogService.addLog(logType, opType, message, errorMessage, hashMessage);
     }
     
     
     /**
 	 * 删除一条数据
 	 * 
 	 * @param id
 	 *            数据id
 	 * @return
 	 */
 	public Boolean delete(String id) throws Exception {
 		return opLogService.delete(id);
 	}
 	
 	public JSONObject getLogsList(Map<String,Object> dic) throws Exception {
		return opLogService.getLogsList(dic);
	}
 	
	/**
	 * 获取所有不用签名文件个数
	 * 
	 * @return
	 */
	public  long getAllNoSignFileCount() throws Exception {
		return opLogService.getAllNoSignFileCount();
	}
	
	
	
	public String  getPublicStatic(String txtStartTime,String txtFinishTime,String txtLogsType,  String txtKey,String orderBy) throws Exception{
		return  opLogService.getPublicStatic(txtStartTime, txtFinishTime, txtLogsType, txtKey, orderBy);
	}
	
	
	

	public OpLogService getOpLogService() {
		return opLogService;
	}

	public void setOpLogService(OpLogService opLogService) {
		this.opLogService = opLogService;
	}
	
}
